The present invention relates to a method and apparatus for controlling a motor and, more particularly, to positioning executed when a mechanism is driven using a motor as a power source.
Currently, motors are used as power sources of various apparatuses. Especially, many OA devices and home electric appliances use DC motors because they have simple structures, require no maintenance, generate little rotation variation and vibration, and are capable of high-speed operation and accurate control.
In recent years, printers, and especially general commercial printers that are often for home use, are required to have not only higher image quality but also lower operation noise. Noise generated in operation includes that generated in printing and that generated in driving mechanical portions. In inkjet printing apparatuses which have only a few noise sources in printing, noise generated in driving mechanical portions is reduced.
An inkjet printing apparatus has, as its main mechanical portions, a printhead scanning mechanism and a printing medium convey mechanism. Noise is reduced by using a DC motor and linear encoder as a driving means for the printhead scanning mechanism. Today, a DC motor and rotary encoder are also being employed as a driving means for the printing medium convey mechanism in many cases.
From the viewpoint of noise reduction, an effect can be expected when a DC motor is employed. From the viewpoint of accurate printing medium conveyance, more advanced position control is required in addition to a mechanical accuracy.
To control the position of a DC motor, the motor is basically powered off when the rotation (angle) of a roller has reached a target position, thereby stopping the motor by inertia.
To ensure stop position accuracy in a mechanism using a DC motor, deceleration before stop and removal of disturbance torque before stop (i.e., stable low-speed operation immediately before stop) are indispensable. When the motor is powered off at a constant and sufficiently low speed, the settling time until stop and stop position accuracy can be stabilized.
To stabilize the speed immediately before stop, stable control must be executed before it. Hence, stable control is preferably realized immediately after the start of control, i.e., from the start time of movement.
However, a printing medium convey mechanism is required to stably convey various kinds of printing media in different sizes and materials and is therefore designed upon assuming a load with a certain magnitude. To move this object, such a force must be applied that the object can move against the static frictional force.
As a feedback control method, PID control is generally known. In this method, integral processing is performed. The magnitude of a thus calculated transient variable (to be referred to as an integral compensation amount hereinafter) is closely related to the magnitude of the output current, i.e., the final calculation result. The integral compensation amount has a value that changes as the time elapses. If its initial value is 0, a long time is consumed until the initial value reaches an integral compensation amount value corresponding to an output current at which the driving force beyond the static frictional force can be obtained.
In addition, there are various kinds of printing media, as described above, and the frictional force generated due to the operation of the convey mechanism itself also individually changes. For this reason, the integral compensation amount corresponding to the output current necessary for actually starting a printing medium also takes various values. That is, when its initial value is 0, the moving start time of a printing medium becomes delayed, and the moving start time varies, making the entire control unstable.
To solve this problem, an appropriate value is preferably set in advance as the initial value. However, the initial value is very difficult to uniquely set because of factors such as a variation in frictional force generated by the operation of the convey mechanism of an individual printer and a change due to the use environment, as described above.
Hence, when a single fixed value is set as the initial value of one product, the initial value may be too large for a printing medium to be conveyed and too small for another printing medium because of the above factors. When the initial value is larger than the optimum value, the speed overshoots at the time of acceleration, resulting in unstable control. On the other hand, when the initial value is smaller than the optimum value, the moving start time of a printing medium is delayed, and the moving start time varies, like the case wherein the initial value is 0.
The present invention has been made in consideration of the above situation, and has as its object to provide a motor control method and apparatus which allow high-speed accurate position control independently of the individual difference in an object to be controlled and the frictional force of a mechanical portion or the difference in use environment.
In order to achieve the above object, a motor control method according to an aspect of the present invention is a motor control method in a device which drives a mechanism using a motor as a power source, characterized by comprising: the pre-driving step of giving a predetermined driving parameter to the motor and driving the mechanism; the command value detection step of, in the pre-driving step, monitoring movement of the mechanism and obtaining a command value to the motor, which is necessary for starting the mechanism; and the control step of controlling driving of the motor using feedback using the command value as an initial value of the driving parameter.
In order to achieve the above object, a motor control apparatus according to an aspect of the present invention is a motor control apparatus in a device which drives a mechanism using a motor as a power source, characterized by comprising: pre-driving means for giving a predetermined driving parameter to the motor and driving the mechanism; command value detection means for, during the pre-driving, monitoring movement of the mechanism and obtaining a command value to the motor, which is necessary for starting the mechanism; and control means for controlling driving of the motor using feedback using the command value as an initial value of the driving parameter.
In the present invention, in controlling a motor in a device which drives a mechanism using the motor as a power source, a predetermined driving parameter is given to the motor, and pre-driving of the mechanism is executed. During pre-driving, the movement of the mechanism is monitored, and a command value to the motor, which is necessary for starting the mechanism, is obtained. Driving of the motor is controlled by feedback control using the command value as the initial value of the driving parameter.
With this arrangement, the initial value of the driving parameter appropriate for starting the mechanism is obtained independently of the individual difference in frictional force of the mechanical portion to be controlled or the difference in use environment. Control is executed using this value.
Hence, high-speed accurate position control can be achieved independently of the individual difference in an object to be controlled and the frictional force of a mechanical portion or the difference in use environment.
Preferably, in the pre-driving step, a predetermined speed command value is given, and feedback control by speed servo is executed, and in the command value detection step, an integral compensation amount is obtained as the command value.
In that case, the predetermined speed command value equals a final speed command value to be given immediately before stop in the control step.
Preferably, the method further comprises the profile generation step of generating an ideal position profile representing a relationship between time and a position and an ideal speed profile representing a relationship between time and a speed, and in the control step, the driving is controlled in four regions including an acceleration region, a constant speed region, deceleration region, and a positioning region, the motor is driven in accordance with the ideal position profile in the acceleration region, constant speed region, and deceleration region, and the motor is driven in accordance with the ideal speed profile in the positioning region.
Preferably, the motor is a DC motor.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.